package com.destiny.controller;


import com.destiny.commons.vo.ResultVO;
import com.destiny.entity.Hero;
import com.destiny.entity.Monster;
import com.destiny.service.HeroService;
import com.destiny.service.MonsterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author et2110
 * @since 2022-03-10
 */
@RestController
@RequestMapping("/monster")
public class MonsterController {

    @Autowired
    MonsterService monsterService;

    @GetMapping("/name")
    public ResultVO<List<Monster>> getUser() {
        List<Monster> monsterList = monsterService.getMonster();
        return ResultVO.success(monsterList);
    }
}

